package com.firefly.dao.dto.cms;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * @description: 广告位
 * @author: lzg(萤火科技 ： 854378082 @ qq.com)
 * @date: 2022/12/18
 **/
@Data
@EqualsAndHashCode
public class AdPosDto implements Serializable {
    private static final long serialVersionUID = 1L;
    @Positive(groups = {update.class}, message = "ID是大于0的整数")
    private Integer id;
    //0:PC/1:MOB
    @Range(min = 0, max = 1, groups = {create.class, update.class}, message = "类型不正确")
    private Integer isMobile;
    //名称
    @NotBlank(groups = {create.class, update.class}, message = "名称不能为空")
    @Size(min = 1, max = 255, groups = {create.class, update.class}, message = "名称长度不正确")
    private String name;
    public interface create {}
    public interface update {}
}
